home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CProgressBar 1.0 / CProgressBar.h < prev   
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.3 KB  |  72 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.  CProgressBar.cp
  3.  
  4.         
  5.     SUPERCLASS = CPane
  6.     
  7.     Copyright © 1994 Johns Hopkins University. All rights reserved.
  8.     
  9.  
  10.  ******************************************************************************/
  11.  
  12. #pragma once
  13.  
  14. #define    _H_CProgressBar
  15.  
  16. #include <CPane.h>
  17.  
  18. enum {                // use color or not
  19.     kDontUseColor,
  20.     kUseColor
  21. };
  22.  
  23. enum {                // orientation of the bar
  24.     kHorizontal,
  25.     kVertical
  26. };
  27.  
  28. enum {                // shadow the bar's frame
  29.     KNoShadow,
  30.     kShadow
  31. };
  32.  
  33. #define SHADOW_DEPTH    2
  34.  
  35.  
  36. class CProgressBar : CPane {
  37.  
  38. public:
  39.  
  40.     Boolean        useShadow;
  41.     Boolean        isVertical;
  42.     Boolean        useColor;
  43.     RGBColor    itsRGBFillColor;
  44.     RGBColor    itsRGBBackColor;
  45.     short        itsPercent;
  46.     Rect        itsFillRect;
  47.     
  48.     void    IProgressBar(
  49.             CView            *anEnclosure,
  50.             CBureaucrat        *aSupervisor,
  51.             short            aWidth,
  52.             short            aHeight,
  53.             short            aHEncl,
  54.             short            aVEncl,
  55.             SizingOption    aHSizing,
  56.             SizingOption    aVSizing,
  57.             Boolean            aColor,
  58.             Boolean            aVertical,
  59.             Boolean            aShadow,
  60.             RGBColor         rgbFColor,
  61.             RGBColor         rgbBColor);
  62.     
  63.     virtual void     Draw(void);
  64.     virtual    void    UseFinderProgressColors(void);
  65.     virtual void    UseSystemTinges(void);
  66.     virtual void    UpdateProgress( short percent );
  67.     
  68. protected:
  69.  
  70.     void CProgressBar::GetWindowTinges(RGBColor *lightTinge, RGBColor *darkTinge);
  71.  
  72. };